package com.louis.di_test;

/**
 * @author XRY
 * @date 2023年06月23日11:08
 */

//员工类
public class Employee {
    private String eName;
    private Integer age;
    private Department dept;

    public String geteName() {
        return eName;
    }

    public void seteName(String eName) {
        this.eName = eName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Department getDept() {
        return dept;
    }

    public void setDept(Department dept) {
        this.dept = dept;
    }

    public void work(){
        System.out.println("Employee working");
        dept.info();
    }

    @Override
    public String toString() {
        return "Employee{" +
                "eName='" + eName + '\'' +
                ", age=" + age +
                ", dept=" + dept +
                '}';
    }
}
